# 对数字列表中数字的求和，求平均值，求最大值，求最小值
def gets_nums(nums):
        nums_sum = 0
        nums_avg = None
        nums_max = None
        nums_min = None
        for n in nums:
            nums_sum += n
            if nums_max == None or nums_max < n:
                nums_max = n
            if nums_min == None or nums_min > n:
                nums_min = n
        nums_avg = nums_sum / len(nums)
        return nums_avg, nums_max, nums_min
nums = [12, 34, 3, 6, 56, 33434, 6, 3, 23, 23, 23, 57, 78, 11, 1, 8, 9, 1]
print(list(gets_nums(nums)))

